package com.wushi.lenovo.asia5b.app_model.inbox;

import android.text.TextUtils;

import com.mvp.base.model.BaseModel;

import java.io.Serializable;
import java.util.List;

/**
 * Created by zhangyuncai on 2019/1/8.
 */
public class InboxMsgModel extends BaseModel {

    /**
     * id : 1
     * title : 1234
     * message : <p>12344&nbsp;</p>
     * mobile_image : /images/no-image.jpg
     * detail_page_source_url : https://www.asia5b.com/news.php?id=111&cat_id=45
     * check_read : FALSE
     */

    private int id;
    private int order_id;
    private String title;
    private String message;
    private String mobile_image;
    private String detail_page_source_url;
    private String check_read;
    private String created_at;
    private List<Action> action;
    private ProductInfo extra_msg;

    public ProductInfo getExtra_msg() {
        return extra_msg;
    }

    public List<Action> getAction() {
        return action;
    }

    public void setCheck_read(String check_read) {
        this.check_read = check_read;
    }

    public int getOrder_id() {
        return order_id;
    }

    public int getId() {
        return id;
    }

    public String getTitle() {
        return title;
    }

    public String getMessage() {
        return message;
    }


    public String getMobile_image() {
        return mobile_image;
    }


    public String getDetail_page_source_url() {
        return detail_page_source_url;
    }


    //true/false  已读/未读
    public boolean getCheck_read() {
        return TextUtils.equals(check_read, "TRUE");
    }


    public String getCreated_at() {
        return created_at;
    }

    public static class ProductInfo implements Serializable {

        /**
         * title : 缺货商品详情
         * product_info : {"image":"https://img.alicdn.com/imgextra/i1/3395466211/O1CN018tcFRV1vkgTm01rJq_!!3395466211.jpg","name":"2019夏季新款时尚雪纺套装女洋气小香风气质马甲短裤显瘦三件套潮","option":"2XL,卡其色","quantity":1,"link":"asia5b://www.asia5b.com/productDetail?id=440930"}
         */

        private String title;
        private ProductInfoBean product_info;

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public ProductInfoBean getProduct_info() {
            return product_info;
        }

        public void setProduct_info(ProductInfoBean product_info) {
            this.product_info = product_info;
        }


    }

    public static class ProductInfoBean implements Serializable {
        /**
         * image : https://img.alicdn.com/imgextra/i1/3395466211/O1CN018tcFRV1vkgTm01rJq_!!3395466211.jpg
         * name : 2019夏季新款时尚雪纺套装女洋气小香风气质马甲短裤显瘦三件套潮
         * option : 2XL,卡其色
         * quantity : 1
         * link : asia5b://www.asia5b.com/productDetail?id=440930
         */

        private String image;
        private String name;
        private String option;
        private int quantity;
        private String link;

        public String getImage() {
            return image;
        }

        public void setImage(String image) {
            this.image = image;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getOption() {
            return option;
        }

        public void setOption(String option) {
            this.option = option;
        }

        public int getQuantity() {
            return quantity;
        }

        public void setQuantity(int quantity) {
            this.quantity = quantity;
        }

        public String getLink() {
            return link;
        }

        public void setLink(String link) {
            this.link = link;
        }
    }

    public static class Action implements Serializable{

        /**
         * url : asia5b://www.asia5b.com/productDetail?id=440930
         * id : 440930
         * redirect : product
         * keyword : 同样的商品页面
         * link_value : product_link
         */

        private String url;
        private int id;
        private String redirect;
        private String keyword;
        private String link_value;

        public String getUrl() {
            return url;
        }

        public int getId() {
            return id;
        }

        public String getRedirect() {
            return redirect;
        }

        public String getKeyword() {
            return keyword;
        }

        public String getLink_value() {
            return link_value;
        }
    }
}
